<%@ page  pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
 body{
	 text-align:center;
 }
 label{
	 font-weight: bold;
 }
</style>
<%
String id = request.getParameter("id");
Integer step = new Integer(0);
if (id == null){
	return;
}
org.languageguide.readings.Reading reading = new org.languageguide.readings.ReadingImpl(id);
String language = reading.getLanguage();
String targetLanguageName = languageguide.LanguageList.getLanguageName(language);

%>
<%!
	public String getSelectedStr(String lang, java.util.Map<String, String> langMap){
		String selected = langMap.get(lang);
		System.out.println(lang + selected);
		if (selected == null){
			return "";
		}
		return selected;
	}
%>
<style type="text/css">
 body{
	 text-align:center;
 }
</style>
</head>

<body>
 <%@ include file="steps.jsp" %>
<form id="form1" name="form1" method="post" action="/user/readings/reading_continue_to_sound.jsp">
	<input name="id" type="hidden" value="<%= id %>" />
    <input name="Submit" type="submit" value="Continue on to Step 2" style="font-size: 120%; margin:20px; padding: 10px;"/>
    </form>
 <div style="width: 600px; margin:auto; text-align:left">

  <p>
    <label for="title">Title:</label>
    <%= reading.getTitle() %><br />
    <label for="title" >Language:</label> 
    
        <%= targetLanguageName %><br />
     
    <% if (reading.hasWordGranularity()){ %> 
      <strong>Word Granularity</strong>
    <% } else{ %> 
     <strong>Sentence Granularity</strong>
     <% } %> 
<br />
 <label for="source">Source of Text:</label> 
   <%= reading.getSource() %>
<br />
<!-- value="([a-z]*)"value="$1" % getSelectedStr("$1", langMap) %> -->
     
    <strong>Text:</strong>
<%= reading.getText() %>    
  </p>
  
  <p>
   
  </p>
</form>
</div>
</body>
</html>
